【Auto】fix(semi-webpack/semi-rspack): 正则支持匹配 @douyinfe/semi-ui-19 等带数字后缀包名#3127
Merged
SudoUserReal merged 1 commit intomainfrom Feb 6, 2026
Merged
【Auto】fix(semi-webpack/semi-rspack): 正则支持匹配 @douyinfe/semi-ui-19 等带数字后缀包名#3127SudoUserReal merged 1 commit intomainfrom
@douyinfe/semi-ui-19 等带数字后缀包名#3127SudoUserReal merged 1 commit intomainfrom
Conversation
This commit was automatically generated by Semi Issue Solver. Closes #3116
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 72ccff0:
|
semi-design
|
||||||||||||||||||||||||||||||
| Project |
semi-design
|
| Branch Review |
solve/issue-3116-1770017038039
|
| Run status |
|
| Run duration | 08m 14s |
| Commit |
|
| Committer | SudoUser |
| View all properties for this run ↗︎ | |
| Test results | |
|---|---|
|
|
0
|
|
|
0
|
|
|
13
|
|
|
0
|
|
|
291
|
Upgrade your plan to view test results. | |
| View all changes introduced in this branch ↗︎ | |
semi-design
|
||||||||||||||||||||||||||||||
| Project |
semi-design
|
| Branch Review |
main
|
| Run status |
|
| Run duration | 08m 15s |
| Commit |
|
| Committer | SudoUser |
| View all properties for this run ↗︎ | |
| Test results | |
|---|---|
|
|
0
|
|
|
0
|
|
|
13
|
|
|
0
|
|
|
291
|
Upgrade your plan to view test results. | |
| View all changes introduced in this branch ↗︎ | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
关联 Issue: #3116
问题概述
@douyinfe/semi-webpack-plugin(以及对应的semi-rspack规则)在判断module.resource路径时,包名匹配正则仅覆盖@douyinfe/semi-ui/semi-icons/semi-foundation,未包含@douyinfe/semi-ui-19这类“带数字后缀”的包名,导致相关 loader/rule 不生效。解决方案
将 Semi 相关依赖的包名匹配逻辑扩展为支持可选的
-数字后缀(例如-19),并保持原有包名/路径匹配边界,避免误匹配。主要变更点
packages/semi-webpack/src/semi-webpack-plugin.ts:扩展匹配正则以覆盖@douyinfe/semi-ui-19等变体,并提取/复用匹配常量以减少重复与维护成本。packages/semi-webpack/README.md:补充说明支持带数字后缀的 Semi 包名形态。packages/semi-rspack/src/rule.ts:同步修复 rspack 侧同类路径匹配规则。packages/semi-rspack/README.md:同步补充文档说明。测试说明
module.resource路径用例进行人工校验,确认@douyinfe/semi-ui-19/lib/...能命中对应规则且不影响原有@douyinfe/semi-ui/lib/...等匹配路径。